//
//  UserLoginView.m
//  UI-豆瓣项目APP
//
//  Created by dllo on 15/10/28.
//  Copyright © 2015年 孙鹏. All rights reserved.
//

#import "UserLoginView.h"

@implementation UserLoginView

- (instancetype)initWithFrame:(CGRect)frame{
    
    self = [super initWithFrame:frame];
    if (self) {
        
        [self creatSubviews];
        
        
    }
    
    return self;
}



- (void)creatSubviews
{
    
    
    self.userName = [[UILabel alloc]initWithFrame:CGRectMake(30, 114, 60, 40)];
    self.userName.text = @"用户名:";
    self.userName.backgroundColor = [UIColor whiteColor];
    [self addSubview:self.userName];
    
    self.userName1 = [[UITextField alloc]initWithFrame:CGRectMake(120, 114, 220, 40)];
    self.userName1.placeholder = @"请输入用户名";
    self.userName1.borderStyle = UITextBorderStyleRoundedRect;
    [self addSubview:self.userName1];
    
    self.code = [[UILabel alloc]initWithFrame:CGRectMake(30, 174, 60, 40)];
    self.code.text = @"密码:";
    self.code.backgroundColor = [UIColor whiteColor];
    [self addSubview:self.code];
    
    self.code1 = [[UITextField alloc]initWithFrame:CGRectMake(120, 174, 220, 40)];
    self.code1.backgroundColor = [UIColor whiteColor];
    self.code1.placeholder = @"请输入密码";
    self.code1.borderStyle = UITextBorderStyleRoundedRect;
    [self addSubview:self.code1];
    
    self.repeatCode = [[UILabel alloc]initWithFrame:CGRectMake(30, 234, 80, 40)];
    self.repeatCode.text = @"确认密码:";
    self.repeatCode.backgroundColor = [UIColor whiteColor];
    [self addSubview:self.repeatCode];
    
    self.repeatCode1 = [[UITextField alloc]initWithFrame:CGRectMake(120, 234, 220, 40)];
    self.repeatCode1.borderStyle = UITextBorderStyleRoundedRect;
    self.repeatCode1.placeholder = @"重新输入密码";
    [self addSubview:self.repeatCode1];
    
    
    self.email = [[UILabel alloc]initWithFrame:CGRectMake(30, 294, 60, 40)];
    self.email.text = @"邮箱:";
    [self addSubview:self.email];
    
    
    self.email1 = [[UITextField alloc]initWithFrame:CGRectMake(120, 294, 220, 40)];
    self.email1.borderStyle = UITextBorderStyleRoundedRect;
    self.email1.placeholder = @"请输入邮箱";
    [self addSubview:self.email1];
    
    
    
    self.phoneNum = [[UILabel alloc]initWithFrame:CGRectMake(30, 354, 80, 40)];
    self.phoneNum.text = @"联系方式:";
    [self addSubview:self.phoneNum];
    
    
    self.phoneNum1 = [[UITextField alloc]initWithFrame:CGRectMake(120, 354, 220, 40)];
    self.phoneNum1.borderStyle = UITextBorderStyleRoundedRect;
    self.phoneNum1.placeholder = @"请输入联系方式";
    self.phoneNum1.keyboardType = UIKeyboardTypePhonePad;
    [self addSubview:self.phoneNum1];
    
}




- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
{
    [self.userName1 resignFirstResponder];
    [self.code1 resignFirstResponder];
    [self.repeatCode1 resignFirstResponder];
    [self.email1 resignFirstResponder];
    [self.phoneNum1 resignFirstResponder];
    
    
    
}


/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
